Integrand size = 39, antiderivative size = 69 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{2} (2 b B+a (A+2 C)) x+\frac {b C \text {arctanh}(\sin (c+d x))}{d}+\frac {(A b+a B) \sin (c+d x)}{d}+\frac {a A \cos (c+d x) \sin (c+d x)}{2 d} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {4159, 4132, 8, 4130, 3855} \[ \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {(a B+A b) \sin (c+d x)}{d}+\frac {1}{2} x (a (A+2 C)+2 b B)+\frac {a A \sin (c+d x) \cos (c+d x)}{2 d}+\frac {b C \text {arctanh}(\sin (c+d x))}{d} \]
[In]
[Out]
Rule 8
Rule 3855
Rule 4130
Rule 4132
Rule 4159
Rubi steps \begin{align*} \text {integral}& = \frac {a A \cos (c+d x) \sin (c+d x)}{2 d}-\frac {1}{2} \int \cos (c+d x) \left (-2 (A b+a B)-(2 b B+a (A+2 C)) \sec (c+d x)-2 b C \sec ^2(c+d x)\right ) \, dx \\ & = \frac {a A \cos (c+d x) \sin (c+d x)}{2 d}-\frac {1}{2} \int \cos (c+d x) \left (-2 (A b+a B)-2 b C \sec ^2(c+d x)\right ) \, dx-\frac {1}{2} (-2 b B-a (A+2 C)) \int 1 \, dx \\ & = \frac {1}{2} (2 b B+a (A+2 C)) x+\frac {(A b+a B) \sin (c+d x)}{d}+\frac {a A \cos (c+d x) \sin (c+d x)}{2 d}+(b C) \int \sec (c+d x) \, dx \\ & = \frac {1}{2} (2 b B+a (A+2 C)) x+\frac {b C \text {arctanh}(\sin (c+d x))}{d}+\frac {(A b+a B) \sin (c+d x)}{d}+\frac {a A \cos (c+d x) \sin (c+d x)}{2 d} \\ \end{align*}
Time = 0.10 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.99 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 a A c+2 a A d x+4 b B d x+4 a C d x+4 b C \text {arctanh}(\sin (c+d x))+4 (A b+a B) \sin (c+d x)+a A \sin (2 (c+d x))}{4 d} \]
[In]
[Out]
Time = 0.26 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.19
method | result | size |
derivativedivides | \(\frac {a A \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a B \sin \left (d x +c \right )+C a \left (d x +c \right )+A b \sin \left (d x +c \right )+B b \left (d x +c \right )+C b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(82\) |
default | \(\frac {a A \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a B \sin \left (d x +c \right )+C a \left (d x +c \right )+A b \sin \left (d x +c \right )+B b \left (d x +c \right )+C b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(82\) |
parallelrisch | \(\frac {-4 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b +4 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b +a A \sin \left (2 d x +2 c \right )+\left (4 A b +4 a B \right ) \sin \left (d x +c \right )+2 \left (2 B b +a \left (A +2 C \right )\right ) d x}{4 d}\) | \(83\) |
risch | \(\frac {a A x}{2}+x B b +a x C -\frac {i A b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {i a B \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} A b}{2 d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} a B}{2 d}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}+\frac {a A \sin \left (2 d x +2 c \right )}{4 d}\) | \(138\) |
norman | \(\frac {\left (\frac {1}{2} a A +B b +C a \right ) x +\left (\frac {1}{2} a A +B b +C a \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\frac {\left (a A +2 A b +2 a B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (3 a A -2 A b -2 a B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}+\left (-a A -2 B b -2 C a \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-\frac {\left (a A -2 A b -2 a B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {\left (3 a A +2 A b +2 a B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2}}+\frac {C b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {C b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(244\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.06 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left ({\left (A + 2 \, C\right )} a + 2 \, B b\right )} d x + C b \log \left (\sin \left (d x + c\right ) + 1\right ) - C b \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (A a \cos \left (d x + c\right ) + 2 \, B a + 2 \, A b\right )} \sin \left (d x + c\right )}{2 \, d} \]
[In]
[Out]
\[ \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right ) \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.23 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.29 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a + 4 \, {\left (d x + c\right )} C a + 4 \, {\left (d x + c\right )} B b + 2 \, C b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 4 \, B a \sin \left (d x + c\right ) + 4 \, A b \sin \left (d x + c\right )}{4 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 159 vs. \(2 (65) = 130\).
Time = 0.30 (sec) , antiderivative size = 159, normalized size of antiderivative = 2.30 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, C b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, C b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (A a + 2 \, C a + 2 \, B b\right )} {\left (d x + c\right )} - \frac {2 \, {\left (A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
[In]
[Out]
Time = 16.41 (sec) , antiderivative size = 156, normalized size of antiderivative = 2.26 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {A\,b\,\sin \left (c+d\,x\right )}{d}+\frac {B\,a\,\sin \left (c+d\,x\right )}{d}+\frac {A\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,b\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {A\,a\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]
[In]
[Out]